#pragma once
#include<iostream>
#include<assert.h>
using namespace  std;

class Data
{
public:
	Data(int year = 1, int month = 1, int day = 1);
	void Dataprinf();
	int Getmonthday(int year, int month)
	{

		static int arr[13] = { -1,31,30,31,30,31,30,31,31,30,31,30,31 };
		if (month == 2 &&
			(year % 4 == 0 && year % 100 != 0) ||
			(year % 400 == 0))
			return 29;
		return arr[month];
	}
	bool operator<(Data d2);
	bool operator<=(Data d2);
	bool operator>(Data d2);
	bool operator>=(Data d2);
	bool operator==(Data d2);
	bool operator!=(Data d2);

	Data operator+ (int day);
	const Data& operator+= (int day);

	Data operator- (int day);
	const Data& operator-= (int day);

	Data& operator++();
	Data operator++(int);
	Data& operator-- ();
	Data operator-- (int);
	
	int operator- (Data d2);
private:
	int _year;
	int _month;
	int _day;
};
